﻿@using System.Collections
@using GigaSite.Web.Areas.ControlPanel.Models
@{
ViewBag.Title = "GigaSite. Главная страница";
}

<div id="page-home">
	<div id="popularCategories" class="section">
		<div class="sectionTitle">
			> Популярные категории
			<div class="triangle"></div>
		</div>
		<div class="sectionContent">
			<div id="categoriesList" class="fl">
				<ul>
					<li><a href="#">Категория 1</a></li>
					<li><a href="#">Категория 2</a></li>
					<li><a href="#">Категория 3</a></li>
					<li><a href="#">Категория 4</a></li>
					<li><a href="#">Категория 5</a></li>
					<li><a href="#">Категория 6</a></li>
					<li><a href="#">Категория 7</a></li>
					<li><a href="#">Категория 8</a></li>
					<li><a href="#">Категория 9</a></li>
					<li><a href="#">Категория 10</a></li>
					<li><a href="#">Категория 11</a></li>
					<li><a href="#">Категория 12</a></li>
				</ul>
			</div>

            <div id="mainBanner" class="fl">
                <div id="activeBannerImage">
                    <img src="" alt="" url="" onclick="window.location.href=$(this).attr('url')"/>
                </div>
                <div id="inactiveBanners">
                    @{
                        @* Баннеры для отображения *@
                        var banners = (IEnumerable<HomePageBanner>) ViewBag.banners;
                    }
                    @foreach(var banner in banners)
                    {
                        <div class="inactiveBanner" id="banner-@banner.Id">
                            <img class="inactiveBannerImage" src="@banner.RealURL" alt="@banner.Title" title="@banner.Title" url="@banner.URL" onclick="window.location.href=$(this).attr('url');"/>
                        </div>
                    }
                </div>
            </div>
		</div>
	</div>

	<div id="top10Markets" class="section">
		<div class="sectionTitle">
			> Топ 10 магазинов
			<div class="triangle"></div>
		</div>
		<div class="sectionContent">
			<ul class="bannerList justify">
				<li class="smallBanner">
					<a href="#">
						<div class="bannerImage"></div>
						<span class="company">Amway</span>
						<span class="orientation">маркетолог</span>
					</a>
				</li>
				<li class="smallBanner">
					<a href="#">
						<div class="bannerImage"></div>
						<span class="company">Amway</span>
						<span class="orientation">маркетолог</span>
					</a>
				</li>
				<li class="smallBanner">
					<a href="#">
						<div class="bannerImage"></div>
						<span class="company">Amway</span>
						<span class="orientation">маркетолог</span>
					</a>
				</li>
				<li class="smallBanner">
					<a href="#">
						<div class="bannerImage"></div>
						<span class="company">Amway</span>
						<span class="orientation">маркетолог</span>
					</a>
				</li>
				<li class="smallBanner">
					<a href="#">
						<div class="bannerImage"></div>
						<span class="company">Amway</span>
						<span class="orientation">маркетолог</span>
					</a>
				</li>
			</ul>

			<div class="clear h_40px"></div>

			<ul class="bannerList justify">
				<li class="smallBanner">
					<a href="#">
						<div class="bannerImage"></div>
						<span class="company">Amway</span>
						<span class="orientation">маркетолог</span>
					</a>
				</li>
				<li class="smallBanner">
					<a href="#">
						<div class="bannerImage"></div>
						<span class="company">Amway</span>
						<span class="orientation">маркетолог</span>
					</a>
				</li>
				<li class="smallBanner">
					<a href="#">
						<div class="bannerImage"></div>
						<span class="company">Amway</span>
						<span class="orientation">маркетолог</span>
					</a>
				</li>
				<li class="smallBanner">
					<a href="#">
						<div class="bannerImage"></div>
						<span class="company">Amway</span>
						<span class="orientation">маркетолог</span>
					</a>
				</li>
				<li class="smallBanner">
					<a href="#">
						<div class="bannerImage"></div>
						<span class="company">Amway</span>
						<span class="orientation">маркетолог</span>
					</a>
				</li>
			</ul>
		</div>
	</div>

	<div id="top5Malls" class="section">
		<div class="sectionTitle">
			> Топ 5 торговых центров
			<div class="triangle"></div>
		</div>
		<div class="sectionContent">
			<ul class="bannerList justify">
				<li class="smallBanner">
					<a href="#">
						<div class="bannerImage"></div>
						<span class="company">Amway</span>
						<span class="orientation">маркетолог</span>
					</a>
				</li>
				<li class="smallBanner">
					<a href="#">
						<div class="bannerImage"></div>
						<span class="company">Amway</span>
						<span class="orientation">маркетолог</span>
					</a>
				</li>
				<li class="smallBanner">
					<a href="#">
						<div class="bannerImage"></div>
						<span class="company">Amway</span>
						<span class="orientation">маркетолог</span>
					</a>
				</li>
				<li class="smallBanner">
					<a href="#">
						<div class="bannerImage"></div>
						<span class="company">Amway</span>
						<span class="orientation">маркетолог</span>
					</a>
				</li>
				<li class="smallBanner">
					<a href="#">
						<div class="bannerImage"></div>
						<span class="company">Amway</span>
						<span class="orientation">маркетолог</span>
					</a>
				</li>
			</ul>
		</div>
	</div>
</div>
<script type="text/javascript">
	$(function () {
		'use strict';

		// Initialize the jQuery File Upload widget:
		$('#fileupload').fileupload();

		// Enable iframe cross-domain access via redirect option:
		$('#fileupload').fileupload(
				'option',
				'redirect',
				window.location.href.replace(
						/\/[^\/]*$/,
						'/cors/result.html?%s'
				)
		);

		if (window.location.hostname === 'blueimp.github.com') {
			// Demo settings:
			$('#fileupload').fileupload('option', {
				url             : '//jquery-file-upload.appspot.com/',
				maxFileSize     : 5000000,
				acceptFileTypes : /(\.|\/)(gif|jpe?g|png)$/i,
				resizeMaxWidth  : 1920,
				resizeMaxHeight : 1200
			});
			// Upload server status check for browsers with CORS support:
			if ($.support.cors) {
				$.ajax({
					url  : '//jquery-file-upload.appspot.com/',
					type : 'HEAD'
				}).fail(function () {
							$('<span class="alert alert-error"/>')
									.text('Upload server currently unavailable - ' +
									new Date())
									.appendTo('#fileupload');
						});
			}
		} else {
			// Load existing files:
			$('#fileupload').each(function () {
				var that = this;
				$.getJSON(this.action, function (result) {
					if (result && result.length) {
						$(that).fileupload('option', 'done')
								.call(that, null, {result : result});
					}
				});
			});
		}

	});

</script>